<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddActivityToConfigStormsTalbe extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('config_storms', function (Blueprint $table) {
            $table->boolean('is_activity_open')->default(false)->comment('是否活动开启');
            $table->decimal('activity_money', 10, 2)->default(10.00)->comment('活动奖励金额');
            $table->integer('junior_team_number')->default(10)->comment('初级团队发奖人数');
            $table->integer('senior_team_number')->default(30)->comment('高级团队发奖人数');
         });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */

    public function down()
    {
        Schema::table('config_storms', function (Blueprint $table) {
            $table->dropColumn(['is_activity_open','activity_money','junior_team_number','senior_team_number']);
        });
    }
}
